package com.cnswhy.cloud.server.core.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.cnswhy.cloud.common.core.base.entity.Entity;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import java.time.LocalDateTime;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import static com.cnswhy.cloud.common.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 *
 * </p>
 *
 * @author cnswhy
 * @since 2020-12-25
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_verify_log")
@ApiModel(value = "VerifyLog", description = "")
@AllArgsConstructor
public class VerifyLog extends Entity<Long> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "")
    @TableField("customer_id")
    @Excel(name = "")
    private Long customerId;

    @ApiModelProperty(value = "实名手机号")
    @Length(max = 11, message = "长度不能超过11")
    @TableField(value = "verify_phone", condition = LIKE)
    @Excel(name = "")
    private String verifyPhone;

    @ApiModelProperty(value = "实名卡号")
    @Length(max = 25, message = "长度不能超过25")
    @TableField(value = "verify_card", condition = LIKE)
    @Excel(name = "")
    private String verifyCard;

    @ApiModelProperty(value = "")
    @Length(max = 30, message = "长度不能超过30")
    @TableField(value = "verify_idNo", condition = LIKE)
    @Excel(name = "")
    private String verifyIdno;

    @ApiModelProperty(value = "实名姓名")
    @Length(max = 25, message = "长度不能超过25")
    @TableField(value = "verify_name", condition = LIKE)
    @Excel(name = "")
    private String verifyName;

    @ApiModelProperty(value = "实名状态")
    @Length(max = 1, message = "长度不能超过1")
    @TableField(value = "status", condition = LIKE)
    @Excel(name = "")
    private String status;

    @ApiModelProperty(value = "状态码")
    @Length(max = 255, message = "长度不能超过255")
    @TableField(value = "resp_code", condition = LIKE)
    @Excel(name = "")
    private String respCode;

    @ApiModelProperty(value = "响应")
    @Length(max = 255, message = "长度不能超过255")
    @TableField(value = "resp_desc", condition = LIKE)
    @Excel(name = "")
    private String respDesc;

    @ApiModelProperty(value = "日期")
    @Length(max = 0, message = "长度不能超过0")
    @TableField(value = "insert_date", condition = LIKE)
    @Excel(name = "")
    private String insertDate;

    @ApiModelProperty(value = "新增时间")
    @TableField("insert_time")
    @Excel(name = "", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime insertTime;


    @Builder
    public VerifyLog(Long id,
                     Long customerId, String verifyPhone, String verifyCard, String verifyIdno, String verifyName,
                     String status, String respCode, String respDesc, String insertDate, LocalDateTime insertTime) {
        this.id = id;
        this.customerId = customerId;
        this.verifyPhone = verifyPhone;
        this.verifyCard = verifyCard;
        this.verifyIdno = verifyIdno;
        this.verifyName = verifyName;
        this.status = status;
        this.respCode = respCode;
        this.respDesc = respDesc;
        this.insertDate = insertDate;
        this.insertTime = insertTime;
    }

}
